package com.wn.class30.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * myorder_share
 * @author 
 */
public class MyorderShare implements Serializable {
    /**
     * 商家订单分润id
     */
    private Integer myorderShareId;

    /**
     * 订单编号
     */
    private String myorderNumber;

    /**
     * 子订单id
     */
    private Integer myorderId;

    /**
     * 订单总价
     */
    private Double myorderTotalPrice;

    /**
     * 商家id
     */
    private Integer businessId;

    /**
     * 商家名称
     */
    private String businessName;

    /**
     * 状态：0未结算，1已结算
     */
    private Integer myorderShareStatus;

    /**
     * 结算时间
     */
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date myorderShareTime;

    /**
     * 备注
     */
    private String remark;

    private static final long serialVersionUID = 1L;

    public Integer getMyorderShareId() {
        return myorderShareId;
    }

    public void setMyorderShareId(Integer myorderShareId) {
        this.myorderShareId = myorderShareId;
    }

    public String getMyorderNumber() {
        return myorderNumber;
    }

    public void setMyorderNumber(String myorderNumber) {
        this.myorderNumber = myorderNumber;
    }

    public Integer getMyorderId() {
        return myorderId;
    }

    public void setMyorderId(Integer myorderId) {
        this.myorderId = myorderId;
    }

    public Double getMyorderTotalPrice() {
        return myorderTotalPrice;
    }

    public void setMyorderTotalPrice(Double myorderTotalPrice) {
        this.myorderTotalPrice = myorderTotalPrice;
    }

    public Integer getBusinessId() {
        return businessId;
    }

    public void setBusinessId(Integer businessId) {
        this.businessId = businessId;
    }

    public String getBusinessName() {
        return businessName;
    }

    public void setBusinessName(String businessName) {
        this.businessName = businessName;
    }

    public Integer getMyorderShareStatus() {
        return myorderShareStatus;
    }

    public void setMyorderShareStatus(Integer myorderShareStatus) {
        this.myorderShareStatus = myorderShareStatus;
    }

    public Date getMyorderShareTime() {
        return myorderShareTime;
    }

    public void setMyorderShareTime(Date myorderShareTime) {
        this.myorderShareTime = myorderShareTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        MyorderShare other = (MyorderShare) that;
        return (this.getMyorderShareId() == null ? other.getMyorderShareId() == null : this.getMyorderShareId().equals(other.getMyorderShareId()))
            && (this.getMyorderNumber() == null ? other.getMyorderNumber() == null : this.getMyorderNumber().equals(other.getMyorderNumber()))
            && (this.getMyorderId() == null ? other.getMyorderId() == null : this.getMyorderId().equals(other.getMyorderId()))
            && (this.getMyorderTotalPrice() == null ? other.getMyorderTotalPrice() == null : this.getMyorderTotalPrice().equals(other.getMyorderTotalPrice()))
            && (this.getBusinessId() == null ? other.getBusinessId() == null : this.getBusinessId().equals(other.getBusinessId()))
            && (this.getBusinessName() == null ? other.getBusinessName() == null : this.getBusinessName().equals(other.getBusinessName()))
            && (this.getMyorderShareStatus() == null ? other.getMyorderShareStatus() == null : this.getMyorderShareStatus().equals(other.getMyorderShareStatus()))
            && (this.getMyorderShareTime() == null ? other.getMyorderShareTime() == null : this.getMyorderShareTime().equals(other.getMyorderShareTime()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getMyorderShareId() == null) ? 0 : getMyorderShareId().hashCode());
        result = prime * result + ((getMyorderNumber() == null) ? 0 : getMyorderNumber().hashCode());
        result = prime * result + ((getMyorderId() == null) ? 0 : getMyorderId().hashCode());
        result = prime * result + ((getMyorderTotalPrice() == null) ? 0 : getMyorderTotalPrice().hashCode());
        result = prime * result + ((getBusinessId() == null) ? 0 : getBusinessId().hashCode());
        result = prime * result + ((getBusinessName() == null) ? 0 : getBusinessName().hashCode());
        result = prime * result + ((getMyorderShareStatus() == null) ? 0 : getMyorderShareStatus().hashCode());
        result = prime * result + ((getMyorderShareTime() == null) ? 0 : getMyorderShareTime().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", myorderShareId=").append(myorderShareId);
        sb.append(", myorderNumber=").append(myorderNumber);
        sb.append(", myorderId=").append(myorderId);
        sb.append(", myorderTotalPrice=").append(myorderTotalPrice);
        sb.append(", businessId=").append(businessId);
        sb.append(", businessName=").append(businessName);
        sb.append(", myorderShareStatus=").append(myorderShareStatus);
        sb.append(", myorderShareTime=").append(myorderShareTime);
        sb.append(", remark=").append(remark);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}